// 获取词条相关接口
import { baseUrl, Post,Get } from '../server'

const severName = 'website/' // 服务前缀名
const newBaseUrl = baseUrl + severName

// 获取词条
const getLanguageEntries: any = (langKey: string, version: string) => {
  const url = newBaseUrl + `languageSource/getListByCode`
  return Post(url, {
    languageId: langKey,
    version: version ? version : '',
  })
}

// 获取标题(在app.vue中调用)
const getLanguageTitle: any = (langKey: string, version: string) => {
  const url = baseUrl + 'bigdata/api/basic/titleinfo'
  return Get(url, {})
}

export const langApi: any = {
  getLanguageEntries,
  getLanguageTitle
}
